﻿@model IEnumerable<PersonInfo>

<div id="personList">
	@if (Model.Any())
	{
		int personCount = Model.Count();
		
		for (int index = 0; index < personCount;index++)
		{
			if(index != 0)
			{
				<div class="dropDownElement" data-person-id="@Model.ElementAt(index).ID">@Model.ElementAt(index).CommonName</div>
			}
			else
			{
				<div class="dropDownElement selectedPerson" data-person-id="@Model.ElementAt(index).ID">@Model.ElementAt(index).CommonName</div>
			}
		}
	}
 else
 {
		<div class="dropDownElement selectedPerson">No matches found</div>
 }
</div>